home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_222 / plplot / examples / example02.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  640b  |  36 lines

  1. /* Demonstrates multiple windows */
  2.  
  3. #include <stdio.h>
  4. #include <math.h>
  5.  
  6. main()
  7. {
  8.       int i,j;
  9.       float vmin,vmax;
  10.       char text[3];
  11.  
  12. /* Divide screen into 16 regions */
  13.  
  14.       plstar(4,4);
  15.       plschr(0.0,3.5);
  16.       plfont(4);
  17.  
  18.       for (i=0; i<=15; i++) {
  19.         sprintf(text,"%d",i);
  20.         pladv(0);
  21.         vmin = 0.1;
  22.         vmax = 0.9;
  23.         for (j=0; j<=2; j++) {
  24.           plvpor(vmin,vmax,vmin,vmax);
  25.           plwind(0.0,1.0,0.0,1.0);
  26.           plbox("bc",0.0,0,"bc",0.0,0);
  27.           vmin = vmin + 0.1;
  28.           vmax = vmax - 0.1;
  29.         }
  30.         plptex(0.5,0.5,1.0,0.0,0.5,text);
  31.       }
  32.  
  33.       plend();
  34. }
  35.  
  36.